package com.esyoga.yoyoga.pojo;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

@Component
public class TPlatformExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TPlatformExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPIdIsNull() {
            addCriterion("p_id is null");
            return (Criteria) this;
        }

        public Criteria andPIdIsNotNull() {
            addCriterion("p_id is not null");
            return (Criteria) this;
        }

        public Criteria andPIdEqualTo(Integer value) {
            addCriterion("p_id =", value, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdNotEqualTo(Integer value) {
            addCriterion("p_id <>", value, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdGreaterThan(Integer value) {
            addCriterion("p_id >", value, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("p_id >=", value, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdLessThan(Integer value) {
            addCriterion("p_id <", value, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdLessThanOrEqualTo(Integer value) {
            addCriterion("p_id <=", value, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdIn(List<Integer> values) {
            addCriterion("p_id in", values, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdNotIn(List<Integer> values) {
            addCriterion("p_id not in", values, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdBetween(Integer value1, Integer value2) {
            addCriterion("p_id between", value1, value2, "pId");
            return (Criteria) this;
        }

        public Criteria andPIdNotBetween(Integer value1, Integer value2) {
            addCriterion("p_id not between", value1, value2, "pId");
            return (Criteria) this;
        }

        public Criteria andPAccountIsNull() {
            addCriterion("p_account is null");
            return (Criteria) this;
        }

        public Criteria andPAccountIsNotNull() {
            addCriterion("p_account is not null");
            return (Criteria) this;
        }

        public Criteria andPAccountEqualTo(String value) {
            addCriterion("p_account =", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountNotEqualTo(String value) {
            addCriterion("p_account <>", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountGreaterThan(String value) {
            addCriterion("p_account >", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountGreaterThanOrEqualTo(String value) {
            addCriterion("p_account >=", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountLessThan(String value) {
            addCriterion("p_account <", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountLessThanOrEqualTo(String value) {
            addCriterion("p_account <=", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountLike(String value) {
            addCriterion("p_account like", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountNotLike(String value) {
            addCriterion("p_account not like", value, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountIn(List<String> values) {
            addCriterion("p_account in", values, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountNotIn(List<String> values) {
            addCriterion("p_account not in", values, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountBetween(String value1, String value2) {
            addCriterion("p_account between", value1, value2, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPAccountNotBetween(String value1, String value2) {
            addCriterion("p_account not between", value1, value2, "pAccount");
            return (Criteria) this;
        }

        public Criteria andPPasswordIsNull() {
            addCriterion("p_password is null");
            return (Criteria) this;
        }

        public Criteria andPPasswordIsNotNull() {
            addCriterion("p_password is not null");
            return (Criteria) this;
        }

        public Criteria andPPasswordEqualTo(String value) {
            addCriterion("p_password =", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordNotEqualTo(String value) {
            addCriterion("p_password <>", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordGreaterThan(String value) {
            addCriterion("p_password >", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordGreaterThanOrEqualTo(String value) {
            addCriterion("p_password >=", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordLessThan(String value) {
            addCriterion("p_password <", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordLessThanOrEqualTo(String value) {
            addCriterion("p_password <=", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordLike(String value) {
            addCriterion("p_password like", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordNotLike(String value) {
            addCriterion("p_password not like", value, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordIn(List<String> values) {
            addCriterion("p_password in", values, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordNotIn(List<String> values) {
            addCriterion("p_password not in", values, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordBetween(String value1, String value2) {
            addCriterion("p_password between", value1, value2, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPPasswordNotBetween(String value1, String value2) {
            addCriterion("p_password not between", value1, value2, "pPassword");
            return (Criteria) this;
        }

        public Criteria andPBanlanceIsNull() {
            addCriterion("p_banlance is null");
            return (Criteria) this;
        }

        public Criteria andPBanlanceIsNotNull() {
            addCriterion("p_banlance is not null");
            return (Criteria) this;
        }

        public Criteria andPBanlanceEqualTo(BigDecimal value) {
            addCriterion("p_banlance =", value, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceNotEqualTo(BigDecimal value) {
            addCriterion("p_banlance <>", value, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceGreaterThan(BigDecimal value) {
            addCriterion("p_banlance >", value, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("p_banlance >=", value, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceLessThan(BigDecimal value) {
            addCriterion("p_banlance <", value, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("p_banlance <=", value, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceIn(List<BigDecimal> values) {
            addCriterion("p_banlance in", values, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceNotIn(List<BigDecimal> values) {
            addCriterion("p_banlance not in", values, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("p_banlance between", value1, value2, "pBanlance");
            return (Criteria) this;
        }

        public Criteria andPBanlanceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("p_banlance not between", value1, value2, "pBanlance");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}